<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

     <div data-options="region:'center'" style="width:100%;height:100%;min-height:680px;"border="true" >
         <table class="easyui-treegrid" data-options="method:'get',animate:true,fit:true" id="menutreeGrid"></table>
         <input id="attribute_categoryId" type="hidden"/>
         <input id="attribute_usageMode" type="hidden"/>
     </div>
     <div id="menu_safe">
         <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="InsertMenu()">新增</a> 
         <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="updateMenu()">修改</a> 
         <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="deleteMenu()">删除</a>
     </div>
     <!-- 添加修改商品分类dialog -->
     <div id="menuDialog" class="easyui-dialog" title="商品分类" modal="true" closed="true"  border="false">
            <div class="easyui-layout" style="width:435px;height:260px;">
                <div class="easyui-panel" title="" style="width:445px;border:0;margin-bottom:2px;padding:5px">
                    
                        <div style="width:416px;height:35px;border:1px solid #CCC;float:left;padding-left:0;margin-left:5px;margin-top:10px; overflow:hidden;padding-top:15px;">
                              <label  style="display: inline-block;width: 110px;text-align:right;">分类名称：</label>
                              <input id="menuid" name="menuid" type="hidden" style="width:180px"/>
                              <input id="menu_name" class="easyui-validatebox textbox"   style="width:250px;height:25px;"  />
                        </div>
                        <div style="width:416px;height:35px;border:1px solid #CCC;float:left;padding-left:0;margin-left:5px;margin-top:10px; overflow:hidden;padding-top:15px;">
                               <label  style="display: inline-block;width: 110px;text-align:right;">选择上级分类：</label>
                               <input id="menuparent" class="easyui-combobox textbox"    data-options="valueField:'id',textField:'text'" style="width:250px;height:25px;"  type="text" />
                        </div>
                        <div style="width:416px;height:35px;border:1px solid #CCC;float:left;padding-left:0;margin-left:5px;margin-top:10px; overflow:hidden;padding-top:15px;">
                               <label  style="display: inline-block;width: 110px;text-align:right;">分类图标：</label>
                               <!-- <a href="javascript:void(0)" class="easyui-linkbutton picFileUpload">上传图片</a> -->
                               <input type="hidden" name="menu_image" id="menu_image"/>
                               <input type="file" name="file_fltb" id="file_fltb"></input>
                               <input type="button" value="上传" onclick="uploadPic()"/>
                        </div>
                        <div style="width:416px;height:35px;border:1px solid #CCC;float:left;padding-left:0;margin-left:5px;margin-top:10px; overflow:hidden;padding-top:15px;">
                                <label  style="display: inline-block;width: 110px;text-align:right;">默认规格书：</label>
                                <input type="hidden" name="menu_file" id="menu_file"></input>
                                <input type="file" name="file_cat_ggs" id="file_cat_ggs"></input>
                                <input type="button" value="上传" onclick="upload()"/>
                        </div>
                    
                </div>  
             </div>   
             <div data-options="region:'south'" border="false" style="height:50px;">
                <div style="width:416px;margin-left:10px;text-align:right;margin-top:10px;">
                    <input name="" type="button" class="scbtn" onclick="saveMenu()" value="保存"/>
                </div>  
                <div id="edit_extend"></div>  
            </div>
    </div> 
    <!-- 属性列表dialog -->
    <div id="attributeListDialog" class="easyui-dialog" title="属性列表" modal="true" closed="true"  border="false">
             <div class="easyui-layout" style="width:535px;height:500px;">
                 <div data-options="region:'center'" style="width:100%;height:100%;min-height:500px;"border="true" >
                    <table class="easyui-datagrid" id="attribute_datagrid"></table>
                 </div> 
           </div>   
    </div> 
    <!-- 添加属性dialog -->
    <div id="attributeDialog" class="easyui-dialog" title="添加属性" modal="true" closed="true"  border="false">
            <div class="easyui-layout" style="width:435px;height:160px;">
                <div class="easyui-panel" title="" style="width:445px;border:0;margin-bottom:2px;padding:5px">
                        <div style="width:416px;height:35px;border:1px solid #CCC;float:left;padding-left:0;margin-left:5px;margin-top:10px; overflow:hidden;padding-top:15px;">
                              <label  style="display: inline-block;width: 110px;text-align:right;">属性名：</label>
                              <input id="attribute_name" class="easyui-validatebox textbox" style="width:250px;height:25px;"/>
                        </div>
                        <div style="width:416px;height:35px;border:1px solid #CCC;float:left;padding-left:0;margin-left:5px;margin-top:10px; overflow:hidden;padding-top:15px;">
                               <label  style="display: inline-block;width: 110px;text-align:right;">属性值：</label>
                               <input id="attribute_value" class="easyui-validatebox textbox" style="width:250px;height:25px;"/>
                        </div>
                </div>  
             </div>   
             <div data-options="region:'south'" border="false" style="height:50px;">
                <div style="width:416px;margin-left:10px;text-align:right;margin-top:10px;">
                    <input name="" type="button" class="scbtn" onclick="saveAttribute()" value="保存"/>
                    <input name="" type="button" class="scbtn" onclick="$('#attributeDialog').dialog('close');" value="取消"/>
                </div>  
            </div>
    </div> 
    
    <!-- 添加属性值dialog -->
    <div id="attributeValueDialog" class="easyui-dialog" title="添加属性值" modal="true" closed="true"  border="false">
            <div class="easyui-layout" style="width:435px;height:80px;">
                <div class="easyui-panel" title="" style="width:445px;border:0;margin-bottom:2px;padding:5px">
                        <div style="width:416px;height:35px;border:1px solid #CCC;float:left;padding-left:0;margin-left:5px;margin-top:10px; overflow:hidden;padding-top:15px;">
                               <label  style="display: inline-block;width: 110px;text-align:right;">属性值：</label>
                               <input id="attributeValue_value" class="easyui-validatebox textbox" style="width:250px;height:25px;"/>
                               <input id="attribute_id" type="hidden"/>
                        </div>
                </div>  
             </div>   
             <div data-options="region:'south'" border="false" style="height:50px;">
                <div style="width:416px;margin-left:10px;text-align:right;margin-top:10px;">
                    <input name="" type="button" class="scbtn" onclick="saveAttributeValue()" value="保存"/>
                    <input name="" type="button" class="scbtn" onclick="$('#attributeValueDialog').dialog('close');" value="取消"/>
                </div>  
            </div>
    </div> 
    
    <!-- 关联品牌dialog -->
     <div id="brandDialog" class="easyui-dialog" title="关联品牌" modal="true" closed="true"  border="false" style="width:480px;height: 450px;">
             <div class="easyui-layout" style="width:435px;height:auto;">
                <div class="easyui-panel" title="" style="width:445px;border:0;margin-bottom:2px;padding:5px">
                        <div id="brandList" style="width:380px;margin-left:20px;float:left;margin-top:20px;"></div>
                </div>  
             </div>   
             <div data-options="region:'south'" border="false" style="height:50px;">
                <div style="width:416px;margin-left:10px;text-align:right;margin-top:10px;">
                    <input name="" type="button" class="scbtn" onclick="saveBrandBind()" value="保存"/>
                </div>  
            </div>
    </div> 
    

<script type="text/javascript" src="${path}/js/item/item-cat.js"></script>